package com.neusoft.service;

import com.neusoft.mapper.DeptMapper;
import com.neusoft.po.Dept;
import com.neusoft.po.ResponseBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DeptServiceImpl implements DeptService{

    @Autowired
    private DeptMapper dm;

    @Override
    public ResponseBean<Dept> getDeptByNo(Integer deptno) {
        Dept dept = dm.getDeptByNo(deptno);

        if(dept!=null){
            return new ResponseBean<>(dept);
        }else{
            return new ResponseBean<>(602,"数据不存在");
        }
    }
}
